<template>
  <el-dialog
    width="75%"
    :title=" '详情页'"
    :close-on-click-modal="false"
    :visible.sync="visible"

  >
    <div style="height: 400px" >
      <!--表格渲染-->
      <el-table :data="dataList" size="small" border style="text-align-all: center" :header-cell-style="{background:'#EAE9E9FF'}">
<!--        <el-table-column type="selection" width="50px"/>-->
        <el-table-column prop="uid" label="用户id" width="70%"/>
        <el-table-column prop="nickname" label="退款人"/>
        <el-table-column prop="refundTradeNo" label="退款流水号"/>
        <el-table-column prop="tradeNo" label="原始流水号"/>
        <el-table-column prop="price" label="退款金额"/>
        <el-table-column prop="status" label="状态">
          <template slot-scope="scope">
            <div v-if="scope.row.status === 2" style="color: #13ce66;font-weight: bold">
              退款成功
            </div>
            <!--          <div v-if="scope.row.status === -1" style="color: black;">-->
            <!--            退款失败-->
            <!--          </div>-->
            <!--          <div v-if="scope.row.status === 0" style="color: red;font-weight: bold">-->
            <!--            待审核-->
            <!--          </div>-->
          </template>
        </el-table-column>
        <el-table-column prop="rechargeMode" label="充值方式">
          <template slot-scope="scope">
            <div v-if="scope.row.rechargeMode=== 0">微信</div>
            <div v-if="scope.row.rechargeMode=== 2" style="color: green">线下打款</div>
            <div v-if="scope.row.rechargeMode=== 1">支付宝</div>
          </template>
        </el-table-column>
        <el-table-column prop="orderSn" label="充值单号" width="180px"/>
        <el-table-column prop="applyTime" label="充值时间" width="180px"/>
        <el-table-column prop="rechargeType" label="充值类型" width="100px">
          <template slot-scope="scope">
            <div v-if="scope.row.rechargeType=== 0">正常充值</div>
            <div v-if="scope.row.rechargeType=== 1">保证金</div>
          </template>
        </el-table-column>
        </el-table>
    </div>
  </el-dialog>
</template>

<script>
import { info } from '@/api/ums/userRecharge'

export default {
  name: 'showDetail',
  data() {
    return {
      visible: false,
      dataList: [],
      dataForm: {
        id: ''
      }
    }
  },
  methods: {
    init(id) {
      this.dataForm.id = id || 0
      this.visible = true
      this.$nextTick(() => {
        if (this.dataForm.id) {
          info(this.dataForm.id).then(res => {
            this.dataList = [res.data]
          })
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
